package com.yiji.fintech.musfinance.common.domain;

import com.yiji.fintech.musfinance.base.enums.NotifyStatusEnum;
import com.yiji.fintech.musfinance.base.enums.TradeTypeEnum;
import com.yiji.fintech.musfinance.center.depositback.order.facade.DepositBackFacadeOrder;
import com.yiji.fintech.musfinance.common.annotation.ChannelContext2Domain;
import com.yiji.fintech.musfinance.common.annotation.Order2Domain2Event;
import com.yiji.fintech.musfinance.common.annotation.RuleStrategyAnnotation;
import com.yiji.fintech.musfinance.common.domain.base.BaseDomain;
import com.yiji.fintech.musfinance.common.eventbus.event.DepositBackEvent;
import com.yiji.fintech.musfinance.common.strategy.converter.Context2DomainDepositBackStrategy;
import com.yiji.fintech.musfinance.common.strategy.enginerules.DepositBackRulesStrategy;
import com.yiji.fintech.musfinance.service.TransactionDepositBackService;
import lombok.Data;

import java.util.Date;

/**
 * 充退Domain
 * Created by ouwen@yiji.com} on 2017/10/16.
 */
@Order2Domain2Event(eventClass = DepositBackEvent.class,
        orderClass = DepositBackFacadeOrder.class,
        dbServiceClass = TransactionDepositBackService.class)
@RuleStrategyAnnotation(strategyClass = DepositBackRulesStrategy.class)
@ChannelContext2Domain(c2dsClass = Context2DomainDepositBackStrategy.class)
@Data
public class DepositBackDomain extends BaseDomain {
    /**
     * 原充值内部流水号
     */
    private String oldBizOrderNo;
    /**
     原充值外部流水号
     */
    private String oldMerchOrderNo;
    /**
     * 原交易标识
     */
    private TradeTypeEnum oldTradeType;
    /**
     原渠道编码
     */
    private String oldGatewayChannelApi;
    /**
     退款银行编码
     */
    private String backBankId;
    /**
     退款账号
     */
    private String backAccountNo;
    /**
     退款账号名
     */
    private String backAccountName;
    /**
     退款原因
     */
    private String refundReason;
    /**
     * 通知状态
     */
    private NotifyStatusEnum notifyStatus = NotifyStatusEnum.NO;
    /**
     发送网关时间
     */
    private Date gatewayTime;
}
